
package com.ruoyi.test.service.impl;

import com.ruoyi.test.domain.Cinema;
import com.ruoyi.test.mapper.CinemaMapper;
import com.ruoyi.test.service.CinemaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CinemaServiceImpl implements CinemaService {

    @Autowired
    private CinemaMapper cinemaMapper;

    @Override
    public List<Cinema> queryAllCinema() {
        return cinemaMapper.queryAllCinema();
    }

    // 根据条件查询影院
    @Override
    public List<Cinema> queryCinemaByCondition(Cinema cinema) {
        return cinemaMapper.queryCinemaByCondition(cinema);
    }

    // 分页查询影院
    @Override
    public List<Cinema> queryCinemaByPage(Cinema cinema) {
        return cinemaMapper.queryCinemaByPage(cinema);
    }

    // 添加影院
    @Override
    public void addCinema(Cinema cinema) {
        cinemaMapper.addCinema(cinema);
    }

    @Override
    public void updateCinema(Cinema cinema) {
        cinemaMapper.updateCinema(cinema);
    }

    // 删除影院
    @Override
    public void deleteCinemaByIds(String[] cinemaIds) {
        cinemaMapper.deleteCinemaByIds(cinemaIds);
    }
}